package com.charge.util;

import javax.xml.ws.Response;

/**
 * Description :
 * Author : 91658
 * Date : 2018/6/11 16:55
 **/
public class LayResponse<T> {

    private Integer code;
    private String msg;
    private Integer count;
    private T data;

    public static<T> LayResponse<T> createBySuccess(String msg, Integer count, T data) {
        return new LayResponse<>(ResponseCode.SUCCESS.getCode(), msg, count, data);
    }

    public LayResponse(Integer code, String msg, Integer count, T data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
